import requests

url = 'http://yourip/uploadfiles'


FILE_NAME = 'aaa.txt'


with open(FILE_NAME, 'rb') as fb:
    files = {'file': (FILE_NAME, fb, 'application/json')}
    response = requests.post(url, files=files)
    print(response.text)
